<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "admin_account".
 *
 * @property int $id id
 * @property string $username 用户名
 * @property string $password 密码
 * @property int $status 1  有效
 * @property string $ctime
 * @property string $utime
 * @property int $is_main 0 否
 */
class AdminAccount extends \yii\db\ActiveRecord {
    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return 'admin_account';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['status', 'is_main'], 'integer'],
            [['ctime', 'utime'], 'required'],
            [['ctime', 'utime'], 'safe'],
            [['username'], 'string', 'max' => 80],
            [['password'], 'string', 'max' => 32],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'username' => 'Username',
            'password' => 'Password',
            'status' => 'Status',
            'ctime' => 'Ctime',
            'utime' => 'Utime',
            'is_main' => 'Is Main',
        ];
    }
}
